﻿#include "Setting.h"
void Settings::SetValue(const QString& key, const QVariant& value) {
    m_settingMap[key] = value;
}
QVariant Settings::Getvalue(const QString& key, const QVariant& defaultValue)const {
    return m_settings.value(key, defaultValue);

}
void Settings::SyncSettings() {
    for (auto it = m_settingMap.constBegin(); it != m_settingMap.cend(); ++it) {
        m_settings.setValue(it.key(), it.value());
    }
    m_settings.sync();
}